
class UnPayInfoM {
  UnPayInfoM({
      this.orderId,
      this.areaId,
      this.vid, 
      this.sLng,
      this.slat, 
      this.smile, 
      this.emile, 
      this.mile, 
      this.uLng,
      this.uLat,
      this.eLng,
      this.eLat,
      this.ridingTime,
      this.costPrice,
      this.exceedTime,
      this.exceedPrice,
      this.amount, 
      this.ischangeprice, 
      this.couponType,
      this.couponId,
      this.cardId,
      this.cardPrice,
      this.couponAmount,
      this.cashback, 
      this.giveBalance,
      this.trafficFare,
      this.rideStatus, 
      this.paytype, 
      this.settle, 
      this.paystatus, 
      this.payno, 
      this.returntype, 
      this.createuserId,
      this.createUserName,
      this.fromto, 
      this.isrecharge, 
      this.definedid, 
      this.startGroupid, 
      this.vehnof, 
      this.startDistrictId, 
      this.returnDistrictId, 
      this.startAddress, 
      this.returnAddress, 
      this.properties, 
      this.helmetReact, 
      this.faultReport, 
      this.orderType, 
      this.outId, 
      this.prePayAmount, 
      this.brandCode, 
      this.payAmount, 
      this.giftAmount, 
      this.balanceAmount, 
      this.orderStatus, 
      this.orderStatusRemark, 
      this.startTime,
      this.endTime, 
      this.openTime, 
      this.lockTime, 
      this.payTime, 
      this.orderStartTime, 
      this.orderEndTime, 
      this.faultReportHelmet, 
      this.faultReportStandardPark, 
      this.faultReportRfidPark, 
      this.faultReportReturn, 
      this.dailyRidingTimes,
      this.temporaryParkingLockTime, 
      this.isOutRangeOrder, 
      this.orderAppealStatus, 
      this.orderAppealId, 
      this.policyNo, 
      this.isChangePrice, 
      this.maxPreAmount, 
      this.latestAmount, 
      this.showContent, 
      this.applyPolicy,
      this.errorMsg,
  });

  UnPayInfoM.fromJson(dynamic json) {
    orderId = json['orderid'];
    areaId = json['areaid'];
    vid = json['vid'];
    sLng = json['slng'];
    slat = json['slat'];
    smile = json['smile'];
    emile = json['emile'];
    mile = json['mile'];
    uLng = json['ulng'];
    uLat = json['ulat'];
    eLng = json['elng'];
    eLat = json['elat'];
    ridingTime = json['ridingtime'];
    costPrice = json['costprice'];
    exceedTime = json['exceedtime'];
    exceedPrice = json['exceedprice'];
    amount = json['amount'];
    ischangeprice = json['ischangeprice'];
    couponType = json['coupontype'];
    couponId = json['couponid'];
    cardId = json['cardid'];
    cardPrice = json['cardprice'];
    couponAmount = json['couponamount'];
    cashback = json['cashback'];
    giveBalance = json['givebalance'];
    trafficFare = json['trafficfare'];
    rideStatus = json['ride_status'];
    paytype = json['paytype'];
    settle = json['settle'];
    paystatus = json['paystatus'];
    payno = json['payno'];
    returntype = json['returntype'];
    createuserId = json['createuserid'];
    createUserName = json['createusername'];
    fromto = json['fromto'];
    isrecharge = json['isrecharge'];
    definedid = json['definedid'];
    startGroupid = json['start_groupid'];
    vehnof = json['vehnof'];
    startDistrictId = json['start_district_id'];
    returnDistrictId = json['return_district_id'];
    startAddress = json['start_address'];
    returnAddress = json['return_address'];
    properties = json['properties'] != null ? Properties.fromJson(json['properties']) : null;
    helmetReact = json['helmet_react'];
    faultReport = json['fault_report'];
    orderType = json['order_type'];
    outId = json['out_id'];
    prePayAmount = json['pre_pay_amount'];
    brandCode = json['brand_code'];
    payAmount = json['pay_amount'];
    giftAmount = json['gift_amount'];
    balanceAmount = json['balance_amount'];
    orderStatus = json['order_status'];
    orderStatusRemark = json['order_status_remark'];
    startTime = json['start_time']??0;
    endTime = json['end_time'];
    openTime = json['open_time'];
    lockTime = json['lock_time'];
    payTime = json['pay_time'];
    orderStartTime = json['order_start_time'];
    orderEndTime = json['order_end_time'];
    faultReportHelmet = json['fault_report_helmet'];
    faultReportStandardPark = json['fault_report_standard_park'];
    faultReportRfidPark = json['fault_report_rfid_park'];
    faultReportReturn = json['fault_report_return'];
    dailyRidingTimes = json['daily_riding_times'] ?? 0;
    temporaryParkingLockTime = json['temporary_parking_lock_time'];
    isOutRangeOrder = json['is_out_range_order'];
    orderAppealStatus = json['order_appeal_status'];
    orderAppealId = json['order_appeal_id'];
    policyNo = json['policy_no'];
    isChangePrice = json['is_change_price'];
    maxPreAmount = json['max_pre_amount'];
    latestAmount = json['latest_amount'];
    showContent = json['show_content'];
    applyPolicy = json['apply_policy'] != null ? ApplyPolicy.fromJson(json['apply_policy']) : null;
  }
  String? orderId;
  String? areaId;
  String? vid;
  num? sLng;
  num? slat;
  num? smile;
  num? emile;
  num? mile;
  num? uLng;
  num? uLat;
  num? eLng;
  num? eLat;
  num? ridingTime;
  num? costPrice;
  num? exceedTime;
  num? exceedPrice;
  num? amount;
  num? ischangeprice;
  num? couponType;
  String? couponId;
  String? cardId;
  num? cardPrice;
  num? couponAmount;
  num? cashback;
  num? giveBalance;
  num? trafficFare;
  //（0：扫码中，1：用车中，2：关锁中，3：已关锁，4：临时关锁中，5：临时关锁，6：开锁中）
  num? rideStatus;
  num? paytype;
  num? settle;
  num? paystatus;
  String? payno;
  num? returntype;
  String? createuserId;
  String? createUserName;
  num? fromto;
  num? isrecharge;
  String? definedid;
  String? startGroupid;
  String? vehnof;
  String? startDistrictId;
  String? returnDistrictId;
  String? startAddress;
  String? returnAddress;
  Properties? properties;
  num? helmetReact;
  num? faultReport;
  num? orderType;
  String? outId;
  num? prePayAmount;
  String? brandCode;
  num? payAmount;
  num? giftAmount;
  num? balanceAmount;
  //1进行中 2为待支付 3为已支付  4为部分退款 5为已退款
  num? orderStatus;
  String? orderStatusRemark;
  num? startTime;
  num? endTime;
  num? openTime;
  num? lockTime;
  num? payTime;
  num? orderStartTime;
  num? orderEndTime;
  num? faultReportHelmet;
  num? faultReportStandardPark;
  num? faultReportRfidPark;
  num? faultReportReturn;
  num? dailyRidingTimes;
  num? temporaryParkingLockTime;
  num? isOutRangeOrder;
  num? orderAppealStatus;
  num? orderAppealId;
  String? policyNo;
  num? isChangePrice;
  num? maxPreAmount;
  num? latestAmount;
  num? showContent;
  ApplyPolicy? applyPolicy;
  String? errorMsg;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['orderid'] = orderId;
    map['areaid'] = areaId;
    map['vid'] = vid;
    map['slng'] = sLng;
    map['slat'] = slat;
    map['smile'] = smile;
    map['emile'] = emile;
    map['mile'] = mile;
    map['ulng'] = uLng;
    map['ulat'] = uLat;
    map['elng'] = eLng;
    map['elat'] = eLat;
    map['ridingtime'] = ridingTime;
    map['costprice'] = costPrice;
    map['exceedtime'] = exceedTime;
    map['exceedprice'] = exceedPrice;
    map['amount'] = amount;
    map['ischangeprice'] = ischangeprice;
    map['coupontype'] = couponType;
    map['couponid'] = couponId;
    map['cardid'] = cardId;
    map['cardprice'] = cardPrice;
    map['couponamount'] = couponAmount;
    map['cashback'] = cashback;
    map['givebalance'] = giveBalance;
    map['trafficfare'] = trafficFare;
    map['ride_status'] = rideStatus;
    map['paytype'] = paytype;
    map['settle'] = settle;
    map['paystatus'] = paystatus;
    map['payno'] = payno;
    map['returntype'] = returntype;
    map['createuserid'] = createuserId;
    map['createusername'] = createUserName;
    map['fromto'] = fromto;
    map['isrecharge'] = isrecharge;
    map['definedid'] = definedid;
    map['start_groupid'] = startGroupid;
    map['vehnof'] = vehnof;
    map['start_district_id'] = startDistrictId;
    map['return_district_id'] = returnDistrictId;
    map['start_address'] = startAddress;
    map['return_address'] = returnAddress;
    map['helmet_react'] = helmetReact;
    map['fault_report'] = faultReport;
    map['order_type'] = orderType;
    map['out_id'] = outId;
    map['pre_pay_amount'] = prePayAmount;
    map['brand_code'] = brandCode;
    map['pay_amount'] = payAmount;
    map['gift_amount'] = giftAmount;
    map['balance_amount'] = balanceAmount;
    map['order_status'] = orderStatus;
    map['order_status_remark'] = orderStatusRemark;
    map['start_time'] = startTime;
    map['end_time'] = endTime;
    map['open_time'] = openTime;
    map['lock_time'] = lockTime;
    map['pay_time'] = payTime;
    map['order_start_time'] = orderStartTime;
    map['order_end_time'] = orderEndTime;
    map['fault_report_helmet'] = faultReportHelmet;
    map['fault_report_standard_park'] = faultReportStandardPark;
    map['fault_report_rfid_park'] = faultReportRfidPark;
    map['fault_report_return'] = faultReportReturn;
    map['daily_riding_times'] = dailyRidingTimes;
    map['temporary_parking_lock_time'] = temporaryParkingLockTime;
    map['is_out_range_order'] = isOutRangeOrder;
    map['order_appeal_status'] = orderAppealStatus;
    map['order_appeal_id'] = orderAppealId;
    map['policy_no'] = policyNo;
    map['is_change_price'] = isChangePrice;
    map['max_pre_amount'] = maxPreAmount;
    map['latest_amount'] = latestAmount;
    map['show_content'] = showContent;
    if (properties != null) {
      map['properties'] = properties?.toJson();
    }
    if (applyPolicy != null) {
      map['apply_policy'] = applyPolicy?.toJson();
    }
    return map;
  }

  factory UnPayInfoM.error(String error){
    return UnPayInfoM(errorMsg: error.replaceAll('Exception', ''));
  }
}

class ApplyPolicy {
  ApplyPolicy({
    this.applyPolicyNo,
    this.policyNo,
    this.assuranceNo,
    this.insuranceBeginTime,
    this.insuranceEndTime,
    this.order,});

  ApplyPolicy.fromJson(dynamic json) {
    applyPolicyNo = json['ApplyPolicyNo'];
    policyNo = json['PolicyNo'];
    assuranceNo = json['AssuranceNo'];
    insuranceBeginTime = json['InsuranceBeginTime'];
    insuranceEndTime = json['InsuranceEndTime'];
    order = json['Order'];
  }
  String? applyPolicyNo;
  String? policyNo;
  String? assuranceNo;
  String? insuranceBeginTime;
  String? insuranceEndTime;
  String? order;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['ApplyPolicyNo'] = applyPolicyNo;
    map['PolicyNo'] = policyNo;
    map['AssuranceNo'] = assuranceNo;
    map['InsuranceBeginTime'] = insuranceBeginTime;
    map['InsuranceEndTime'] = insuranceEndTime;
    map['Order'] = order;
    return map;
  }

}

class Properties {
  Properties({
    this.totalFee,
    this.totalTime,
    this.freeTime,
    this.startFee,
    this.startTimeLimit,
    this.payByStart,
    this.timeCycle,
    this.everyTimeCyclePrice,
    this.payByTime,
    this.paidTime,
    this.maxPrice,
    this.trafficFare,
    this.serviceOutwardFee,
    this.nostopOutwardFee,
    this.helmetFee,
    this.discountAmount,
    this.isReportFault,
    this.standardParkingFee,
    this.ftRidingFeeReduction,
    this.ftTrafficFareReduction,
    this.studyFreeTrafficReduction,
    this.numberReductionType,
    this.numberReduction,});

  Properties.fromJson(dynamic json) {
    totalFee = json['total_fee'];
    totalTime = json['total_time'];
    freeTime = json['free_time'];
    startFee = json['start_fee'];
    startTimeLimit = json['start_time_limit'];
    payByStart = json['pay_by_start'];
    timeCycle = json['time_cycle'];
    everyTimeCyclePrice = json['every_time_cycle_price'];
    payByTime = json['pay_by_time'];
    paidTime = json['paid_time'];
    maxPrice = json['max_price'];
    trafficFare = json['traffic_fare'];
    serviceOutwardFee = json['service_outward_fee'];
    nostopOutwardFee = json['nostop_outward_fee'];
    helmetFee = json['helmet_fee'];
    discountAmount = json['discount_amount'];
    isReportFault = json['is_report_fault'];
    standardParkingFee = json['standard_parking_fee'];
    ftRidingFeeReduction = json['ft_riding_fee_reduction'];
    ftTrafficFareReduction = json['ft_traffic_fare_reduction'];
    studyFreeTrafficReduction = json['study_free_traffic_reduction'];
    numberReductionType = json['number_reduction_type'];
    numberReduction = json['number_reduction'];
  }
  num? totalFee;
  num? totalTime;
  num? freeTime;
  num? startFee;
  num? startTimeLimit;
  num? payByStart;
  num? timeCycle;
  num? everyTimeCyclePrice;
  num? payByTime;
  num? paidTime;
  num? maxPrice;
  num? trafficFare;
  num? serviceOutwardFee;
  num? nostopOutwardFee;
  num? helmetFee;
  num? discountAmount;
  num? isReportFault;
  num? standardParkingFee;
  num? ftRidingFeeReduction;
  num? ftTrafficFareReduction;
  num? studyFreeTrafficReduction;
  num? numberReductionType;
  num? numberReduction;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['total_fee'] = totalFee;
    map['total_time'] = totalTime;
    map['free_time'] = freeTime;
    map['start_fee'] = startFee;
    map['start_time_limit'] = startTimeLimit;
    map['pay_by_start'] = payByStart;
    map['time_cycle'] = timeCycle;
    map['every_time_cycle_price'] = everyTimeCyclePrice;
    map['pay_by_time'] = payByTime;
    map['paid_time'] = paidTime;
    map['max_price'] = maxPrice;
    map['traffic_fare'] = trafficFare;
    map['service_outward_fee'] = serviceOutwardFee;
    map['nostop_outward_fee'] = nostopOutwardFee;
    map['helmet_fee'] = helmetFee;
    map['discount_amount'] = discountAmount;
    map['is_report_fault'] = isReportFault;
    map['standard_parking_fee'] = standardParkingFee;
    map['ft_riding_fee_reduction'] = ftRidingFeeReduction;
    map['ft_traffic_fare_reduction'] = ftTrafficFareReduction;
    map['study_free_traffic_reduction'] = studyFreeTrafficReduction;
    map['number_reduction_type'] = numberReductionType;
    map['number_reduction'] = numberReduction;
    return map;
  }

}